<!DOCTYPE html>
<html lang="" class="dark">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  <title>
    <%= VUE_APP_TITLE %>
  </title>
  <style>
    html {
      min-height: 100%;
      min-width: 100%;
      color-scheme: light;
    }

    html.dark {
      color-scheme: dark;
      background-color: #294c95;
      background-size: cover;
    }

    html.dark #app {
      background: transparent;
    }

    .safe-note {
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      padding: 15px 60px 15px 20px;
      font-size: 14px;
      background-color: #fffbdd;
      color: #53524f;
      z-index: 999;
      overflow: hidden;
      opacity: 0;
      transform: translateY(-100%);
      transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .safe-note.show {
      opacity: 1;
      transform: translateY(0);
    }

    .safe-note-title {
      float: left;
    }

    .safe-note-content {
      margin: 0;
    }

    .safe-note-close {
      cursor: pointer;
      display: inline-block;
      width: 24px;
      height: 24px;
      line-height: 24px;
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
      z-index: 99;
      font-size: 18px;
      text-align: center;
    }

    .app-start-loading {
      background-color: hsla(0, 0%, 100%, .9);
      margin: 0;
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      transition: opacity .3s;
    }

    .app-start-loading .loading-spinner {
      top: 50%;
      margin-top: -25px;
      width: 100%;
      text-align: center;
      position: absolute;
    }

    .line-scale-pulse-out div {
      background-color: #409eff;
      width: 4px;
      height: 35px;
      border-radius: 2px;
      margin: 2px;
      -webkit-animation-fill-mode: both;
      animation-fill-mode: both;
      display: inline-block;
      -webkit-animation: line-scale-pulse-out 0.9s -0.6s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85);
      animation: line-scale-pulse-out 0.9s -0.6s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85);
    }

    .line-scale-pulse-out div:nth-child(1),
    .line-scale-pulse-out div:nth-child(5) {
      animation-delay: -0.2s;
    }

    .line-scale-pulse-out div:nth-child(2),
    .line-scale-pulse-out div:nth-child(4) {
      animation-delay: -0.4s;
    }

    .app-start-loading .loading-text {
      top: 50%;
      margin-top: 50px;
      width: 100%;
      text-align: center;
      font-size: 18px;
      position: absolute;
    }

    @keyframes line-scale-pulse-out {
      0% {
        transform: scaley(1);
      }

      50% {
        transform: scaley(0.4);
      }

      100% {
        transform: scaley(1);
      }
    }

    html.dark .app-start-loading {
      background-color: rgb(1, 32, 81);
    }
  </style>
  <script src="<%= BASE_URL %>global.js"></script>
  <script>
    window._AMapSecurityConfig = {
      securityJsCode: '07fddc628de15bb9369fe0dad289c05d'
    }
  </script>
</head>

<body>
  <noscript>
    <strong>JavaScript Unavailable</strong>
  </noscript>
  <div class="safe-note">
    <strong class="safe-note-title">温馨提示：</strong>
    <p class="safe-note-content">
      为了确保您的顺畅体验，我们强烈建议您下载并安装最新版的谷歌浏览器。
      <a href="https://www.google.cn/intl/zh-CN/chrome/">
        下载
      </a>
    </p>
    <span class="safe-note-close">×</span>
  </div>
  <div id="app">
    <div class="app-start-loading" style="z-index: 5000;">
      <div class="loading-spinner">
        <div class="loader-inner line-scale-pulse-out">
          <div></div>
          <div></div>
          <div></div>
          <div></div>
          <div></div>
        </div>
      </div>
      <p class="loading-text">系统加载中...</p>
    </div>
  </div>
  <script type="text/javascript">
    function notification(bool) {
      var elem = document.querySelector('.safe-note');
      elem.classList[bool ? 'add' : 'remove']('show');
    }
    function addListener() {
      var elem = document.querySelector('.safe-note');
      var close = document.querySelector(
        '.safe-note-close'
      );
      close.addEventListener('click', function () {
        elem.classList.remove('show');
      });
    }
    function startSniffer() {
      var ua = navigator.userAgent;
      // console.log(ua);
      var isChrome = /Chrome/.test(ua);
      var isSafeChrome = isChrome;
      try {
        var versionName = ua.match(/Chrome\/([\d.]+)/)[1];
        var version = versionName
          .split('.')
          .map(Number)[0];
        isSafeChrome = isChrome && version >= 90;
      } catch (e) { }

      // 非谷歌内核或谷歌内核版本小于90
      if (!isSafeChrome) {
        addListener();
        setTimeout(() => {
          notification(true);
        }, 2e3);
      }
    }
    startSniffer();
  </script>
  <!-- built files will be auto injected -->
</body>

</html>